package cn.tedu.mintmall.controller;

import cn.tedu.mintmall.dto.UserAdminDTO;
import cn.tedu.mintmall.restful.JsonResult;
import cn.tedu.mintmall.service.IUserAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/detail")
@Api("用户页管理")
public class UserAdminController {
    @Autowired
    private IUserAdminService userAdminService;
    @PostMapping("update")
    @ApiOperation("根据用户信息修改用户详情")
    public JsonResult updateUserDetail(UserAdminDTO userAdminDTO){
        userAdminService.updateUserDetail(userAdminDTO);
        return JsonResult.ok("修改完成!");
    }
}
